<?php

	/**
     * Event listener
     *
	 * Base class for event listeners
	 *
	 * @package      Core
	 * @subpackage   Event
     *
     * @license      GNU Lesser General Public Licence see LICENCE-LGPL file or http://www.gnu.org/licenses/lgpl.html
	 */
	class Core_Event_Listener extends Core_Object
    {

	////////////////////////////////////////////////////////////////////////////
	//                                 Methods                                //
	////////////////////////////////////////////////////////////////////////////

        /**
         * Constructor
         */
        public function __construct()
        {
        }

		/**
		 * Destructor
		 */
		public function __destruct()
		{
			unset($this);
		}

        /**
        * Event delegate
        *
        * @param        Core_Event      $event : the fired event
        * @return       void
        */
        public function performEvent(Core_Event &$event)
        {
            $methodName = 'on'. ucfirst($event->getName());
            $this->{$methodName}($event);
        }
    }
